import { axios } from '@/utils/request'

/**
 * 获取违章列表
 *
 * @author yubaoshan
 * @date 2020/4/26 12:08
 */
 export function getQHSEXyViolationList () {
  return axios({
    url: '/QHSEXyViolation/list',
    method: 'get'
  })
}

/**
 * 获取违章列表
 *
 * @author yubaoshan
 * @date 2020/4/26 12:08
 */
export function getQHSEXyViolationPage (parameter) {
  return axios({
    url: '/QHSEXyViolation/page',
    method: 'get',
    params: parameter
  })
}
/**
 * 获取发包公司违章列表
 *
 * @author yubaoshan
 * @date 2020/4/26 12:08
 */
export function getQHSEXyFbViolationPage (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/Page',
    method: 'get',
    params: parameter
  })
}

export function QHSEXyViolationEdit (parameter) {
  return axios({
    url: '/QHSEXyViolation/edit',
    method: 'post',
    data: parameter
  })
}

export function QHSECrossViolationEdit (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/Edit',
    method: 'post',
    data: parameter
  })
}

export function QHSEXyViolationDetail (parameter) {
  return axios({
    url: '/QHSEXyViolation/queryDetail',
    method: 'post',
    data: parameter
  })
}
/*
交叉方管理详情
*/
export function QHSEXyCorssViolationDetail (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/QueryDetail',
    method: 'post',
    data: parameter
  })
}

export function QHSEXyViolationDelete (parameter) {
  return axios({
    url: '/QHSEXyViolation/delete',
    method: 'delete',
    data: parameter
  })
}

export function QHSEOverLappingViolationDelete (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/Delete',
    method: 'delete',
    data: parameter
  })
}
/**
 * 违章性质列表
 * @returns
 */
export function getQHSEXyViolationTypeList () {
  return axios({
    url: '/QHSEXyViolationType/list',
    method: 'get'
  })
}
/**
 * 安全沟通列表
 * @returns
 */
export function getQHSEViolationObserverList () {
  return axios({
    url: '/QHSEViolationObserver/list',
    method: 'get'
  })
}
/**
 * 体系要素列表
 * @returns
 */
export function getQHSEViolationHSEList () {
  return axios({
    url: '/QHSEViolationHSE/List',
    method: 'get'
  })
}
/**
 * 通用违章条款查询
 * @param {*} parameter
 * @returns
 */
export function getQHSEXyGeneralViolation (parameter) {
  return axios({
    url: '/QHSEXyGeneralViolation/ClausePage',
    method: 'get',
    params: parameter
  })
}
/**
 * 专业违章条款查询
 * @param {*} parameter
 * @returns
 */
export function getQHSEXySpecialtyViolation (parameter) {
  return axios({
    url: '/QHSEXySpecialtyViolation/ClausePage',
    method: 'get',
    params: parameter
  })
}
/**
 * 综合违章查询
 * @param {*} parameter
 * @returns
 */
export function getQHSEComPage (parameter) {
  return axios({
    url: '/QHSEXyViolation/ComPage',
    method: 'post',
    data: parameter
  })
}
/**
 * 导出Excel
 * @param {*} parameter
 * @returns
 */
export function getDownloadExcel (parameter) {
  return axios({
    url: '/QHSEXyViolation/DownloadExcel',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

/**
 * 导出交叉方违章Excel
 * @param {*} parameter
 * @returns
 */
export function getCrossDownloadExcel (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/DownloadExcel',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

/**
 * 作业专业分析
 * @param {*} parameter
 * @returns
 */
 export function getVioWSAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/WorkSpecialtyAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 违章原因分析
 * @param {*} parameter
 * @returns
 */
 export function getVioCauseAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationCauseAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 归属直线部门分析
 * @param {*} parameter
 * @returns
 */
 export function getDirDepartAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/DirectDepartmentAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 违章性质分析
 * @param {*} parameter
 * @returns
 */
 export function getVioTypeAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationTypeAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 违章总体分析
 * @param {*} parameter
 * @returns
 */
 export function getTrendAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/DangerTrendAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 专业/通用分析
 * @param {*} parameter
 * @returns
 */
 export function getVioTypeCategoryAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationTypeCategoryAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 工龄分析
 * @param {*} parameter
 * @returns
 */
 export function getVioWorkYearAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/WorkYearAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 年龄分析
 * @param {*} parameter
 * @returns
 */
 export function getVioAgeAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/AgeAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 用工性质分析
 * @param {*} parameter
 * @returns
 */
 export function getVioEmployeeTypeAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/EmployeeTypeAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 违章类别分析
 * @param {*} parameter
 * @returns
 */
 export function getVioCategoryAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationCategoryAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 体系要素分析
 * @param {*} parameter
 * @returns
 */
 export function getVioHseElementAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/HseElementAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 不安全因素分析
 * @param {*} parameter
 * @returns
 */
 export function getVioBAQYSAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/BAQYSAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 人的不安全行为分析
 * @param {*} parameter
 * @returns
 */
 export function getVioRDBAQXWAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/RDBAQXWAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 管理缺陷分析
 * @param {*} parameter
 * @returns
 */
 export function getVioQXGLAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/QXGLAnalysis',
    method: 'post',
    data: parameter
  })
}
/**
 * 二级单位分析
 * @param {*} parameter
 * @returns
 */
export function getSecondaryUnitAnalysis (parameter) {
  return axios({
    url: '/QHSEXyViolation/SecondaryUnitAnalysis',
    method: 'post',
    data: parameter
  })
}

/**
 * 图片对比
 * @param {*} parameter
 * @returns
 */
 export function vioComparePic (parameter) {
  return axios({
    url: '/QHSEXyViolation/ComparePic',
    method: 'post',
    data: parameter
  })
}

/**
 * 重复性违章
 * @param {*} parameter
 * @returns
 */
 export function vioRepeat (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationAdministerRepeat',
    method: 'post',
    data: parameter
  })
}
/**
 * 数据分析
 */
export function getViolationTotalQuery (parameter) {
  return axios({
    url: '/QHSEXyViolation/ViolationTotalQuery',
    method: 'post',
    data: parameter
  })
}

/**
 * 相关方数据分析
 */
export function getOverLappingTotalQuery (parameter) {
  return axios({
    url: '/QHSEOverLappingViolation/GetOverLappingTotal',
    method: 'post',
    data: parameter
  })
}
/**
 * 违章全职业生命周期
 */
export function getPeopleComPageUser (parameter) {
  return axios({
    url: '/QHSEXyViolation/ComPageUser',
    method: 'post',
    data: parameter
  })
}
/**
 * 违章全职业生命周期导出
 */
export function getPeopleComPageUserExport (parameter) {
  return axios({
    url: '/QHSEXyViolation/DownloadExcelUser',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}
/**
 * 隐患数据推送
 */
export function getDataPush (parameter) {
  return axios({
    url: '/QHSEXyViolation/Push',
    method: 'post',
    data: parameter
  })
}
